package top.lunarye.utils;

import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import top.lunarye.modules.staff.entity.dto.StaffExcelInsertDO;
import top.lunarye.modules.staff.entity.dto.StaffInsertDTO;

import java.io.File;
import java.util.List;

/**
 * @description:
 * @author: lunar
 * @since: 2021-07-20
 */
public class ExcelReadUtil {
    /**
     * 从excel中读取出待添加staff的信息
     * @param file
     * @return
     */
    public static List<StaffExcelInsertDO> getStaffInfoListFromExcel(File file) {
        ExcelReader reader = ExcelUtil.getReader(file);
        return reader.readAll(StaffExcelInsertDO.class);
    }
}
